package cn.com.smartdevices.bracelet.config;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

import com.goodving.guli.bt.model.LoginData;
import com.goodving.guli.view.C3657a;

import java.util.Locale;

/* renamed from: cn.com.smartdevices.bracelet.e.a */
public class C0886a {
    public static final String f4466a = "CURRENT_USER_ID";
    public static final String f4467b = "device_id";
    public static final String f4468c = "uid";
    public static final String f4469d = "security";
    private static final String f4470e = "keeper";

    public static String m9062a(Context context) {
        return context.getSharedPreferences(f4470e, 0).getString("debug_channel", "");
    }

    public static void m9063a(Context context, long j, String str) {
        Editor edit = context.getSharedPreferences(f4470e, 0).edit();
        edit.putLong(f4468c, j);
        edit.putString(f4469d, str);
        edit.commit();
    }

    public static void m9064a(Context context, String str) {
        Editor edit = context.getSharedPreferences(f4470e, 0).edit();
        edit.putString(f4467b, str);
        edit.commit();
    }

    public static String m9065b(Context context) {
        return context.getSharedPreferences(f4470e, 0).getString("debug_host", C3657a.f18328f);
    }

    @SuppressLint({"NewApi"})
    public static void m9066b(Context context, String str) {
        Editor edit = context.getSharedPreferences(f4470e, 0).edit();
        edit.putString("debug_channel", str);
        edit.apply();
    }

    public static String m9067c(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences(f4470e, 0);
        Locale locale = Locale.getDefault();
        Editor edit = sharedPreferences.edit();
        edit.putString("Locale", locale.toString());
        edit.commit();
        return locale.toString();
    }

    @SuppressLint({"NewApi"})
    public static void m9068c(Context context, String str) {
        Editor edit = context.getSharedPreferences(f4470e, 0).edit();
        edit.putString("debug_host", str);
        edit.apply();
    }

    public static String m9069d(Context context) {
        return context.getSharedPreferences(f4470e, 0).getString(f4467b, C3657a.f18328f);
    }

    public static String m9070e(Context context) {
        return context.getSharedPreferences(f4470e, 0).getString("Locale", C3657a.f18328f);
    }

    public static LoginData m9071f(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences(f4470e, 0);
        LoginData loginData = new LoginData();
        loginData.uid = sharedPreferences.getLong(f4468c, -1);
        loginData.security = sharedPreferences.getString(f4469d, null);
        return loginData;
    }
}
